<?php
declare (strict_types=1);

namespace App\Model;


class Channel extends Model
{
    /**
     * The table associated with the model.
     *
     * @var string
     */
    protected $table = 'channel';

    protected $primaryKey = 'channel_id';

    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = [
        'tenant_id',
        'channel_sign',
        'channel_name',
        'source',
        'channel_type',
        'creator_uid',
        'remark',
        'link',
        'created_at',
        'updated_at',
    ];

    // 渠道来源：1 系统默认，2 销售自建
    const CHANNEL_SOURCE_DEFAULT = 1;
    const CHANNEL_SOURCE_SELLER  = 2;
    public static $channelSourceDesc = [
        self::CHANNEL_SOURCE_DEFAULT => '系统默认',
        self::CHANNEL_SOURCE_SELLER  => '销售自建',
    ];

    // 渠道分类
    const CHANNEL_TYPE_REPLY_FORM = 1;
    const CHANNEL_TYPE_REGISTER   = 2;
    public static $channelTypeDesc = [
        self::CHANNEL_TYPE_REPLY_FORM => '留资表单',
        self::CHANNEL_TYPE_REGISTER   => '店铺注册',
    ];

}